//
//  NSString+Category.h
//  LinHuaQianBusiness
//
//  Created by zhangsong on 16/8/16.
//  Copyright © 2016年 Shuang Qian Online Payment Company. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSString (Category)

- (NSInteger)byteLength;
- (BOOL)stringContainsEmoji;
- (BOOL)hasChinese;
/**
 修改字符串中数字颜色, 并返回对应富文本
 
 @param color 数字颜色, 包括小数
 @param normalColor 默认颜色
 @return 结果富文本
 */
- (NSMutableAttributedString *)modifyDigitalColor:(UIColor *)color normalColor:(UIColor *)normalColor;
// 判断手机号
- (BOOL)checkPhoneNumFunction;
// 判断固话
- (BOOL)checkFixedPhoneNumber ;
// 验证邮箱格式
-(BOOL)cheakValidateEmail;
//身份证号
- (BOOL)CheckIsIdentityCard;
//  判断是否是数字
- (BOOL)CheckIsALBNumber;
/**
 *
 *判断是否为金额输入格式(正在输入)
 */
-(BOOL)isValidateMoneying;

//取出字符串中的数字字符串
-(NSString *)takeOutStringNumber;

// label 自适应宽度
- (CGSize)sizeForNoticeFont:(UIFont*)font withHeight:(CGFloat)maxHeight;
// label 自适应高度
- (CGSize)sizeForNoticeFont:(UIFont*)font withWdith:(CGFloat)maxWdith;

//判断字符串中包含数字和字母的几种情况
-(int)checkIsHaveNumAndLetter;


//手机号、银行卡、身份证脱敏处理
-(NSString *)phoneTransform;
-(NSString *)bankCardTransform;
-(NSString *)IDCardTransform;

+(NSString *)countNumAndChangeformat:(NSString *)num;

- (BOOL)isEmptyString;
- (BOOL)isPureInt:(NSString *)string;
//改变指定字符串的颜色
- (NSMutableAttributedString *)hlChangeStr:(NSString *)tragetStr toColor:(UIColor *)tragetColor;

- (NSDate *)toDate;
- (CGFloat)actualWidthWithFont:(UIFont *)font;
- (UIImage *)toQRCodeImageWithSize:(CGFloat)size;

//判断是否为整形：
- (BOOL)isPureInt;
//判断是否为浮点形：
- (BOOL)isPureFloat;

//从url中解析出参数表
- (NSDictionary*)parseURLParams;
@end
